package cn.tedu.mapper.petdetails;

import cn.tedu.pojo.pet.entity.PetCommodity;
import cn.tedu.pojo.pet.entity.PetDetails;
import io.swagger.models.auth.In;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.time.LocalDateTime;

@Repository
public interface PetDetailsMapper {

    //管理员添加宠物详情
    int addDetails(PetDetails petDetails);
    //管理员修改宠物详情
    void updatePetDetails(PetDetails petDetails);
    //管理员修改宠物详情启用情况
    void updateIsDelete(@Param("id") Long id, @Param("isDelete") Integer isDelete);
    //从商品表中查询id是否存在
    PetCommodity getById(Long commodityId);


    //通过传入的commodityId来获取库存信息，同时要筛选是否启用状态//TODO
    PetDetails getStockByCommodityId(Long commodityId);



    PetDetails getDetailsById(Long id);
}
